import Vue from 'vue'
import VueRouter from 'vue-router'

import IndexView from "@/views/IndexView";
import ContentView from "@/views/ContentView";

Vue.use(VueRouter)
//
const routes = [
  {
    path: '/',
    name: 'index',
    component: IndexView,
    children:[
      {
        path: 'content/:dictId(\\d+)',
        name:'content',
        component: ContentView,
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    component: () => import( '../views/LoginView.vue')
  },
  {
    path: '/agreement',
    name: 'agreement',
    component: () => import( '../views/AgreementView.vue')
  },
  {
    path: '/tharPerson',
    name: 'tharPerson',
    component: () => import( '../views/TharPersonView.vue')
  },


]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
